<?php

namespace app\shop\model\user;

use app\shop\model\BaseModel;
use app\shop\model\goods\GoodsModel;
use think\model\concern\SoftDelete;
use think\model\relation\BelongsTo;

class UserFavoriteModel extends BaseModel
{
    use SoftDelete;

    protected $name = 'shop_user_favorite';

    public function goods(): BelongsTo
    {
        return $this->belongsTo(GoodsModel::class, 'goods_id', 'id')->bind(['name', 'images', 'min_price', 'max_origin_price']);
    }
}